#include <stdio.h>

unsigned long long a[60] = {

	1,
	11,
	21,
	1211,
	111221,
	312211,
	13112221,
	1113213211,
	31131211131221,
	13211311123113112211,
	11131221133112132113212221,
	3113112221232112111312211312113211
};

int main(void)
{
	unsigned int n = 0;

	scanf("%u", &n);

	printf("%llu", a[n]);

	return 0;
}